# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestPipeline do
  @moduledoc """
  The configuration of the Cloud Storage Ingestion pipeline.

  ## Attributes

  *   `inputPath` (*type:* `String.t`, *default:* `nil`) - The input Cloud Storage folder. All files under this folder will be imported to Document Warehouse. Format: `gs:///`.
  *   `pipelineConfig` (*type:* `GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1IngestPipelineConfig.t`, *default:* `nil`) - Optional. The config for the Cloud Storage Ingestion pipeline. It provides additional customization options to run the pipeline and can be skipped if it is not applicable.
  *   `processorType` (*type:* `String.t`, *default:* `nil`) - The Doc AI processor type name. Only used when the format of ingested files is Doc AI Document proto format.
  *   `schemaName` (*type:* `String.t`, *default:* `nil`) - The Document Warehouse schema resource name. All documents processed by this pipeline will use this schema. Format: projects/{project_number}/locations/{location}/documentSchemas/{document_schema_id}.
  *   `skipIngestedDocuments` (*type:* `boolean()`, *default:* `nil`) - The flag whether to skip ingested documents. If it is set to true, documents in Cloud Storage contains key "status" with value "status=ingested" in custom metadata will be skipped to ingest.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :inputPath => String.t() | nil,
          :pipelineConfig =>
            GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1IngestPipelineConfig.t()
            | nil,
          :processorType => String.t() | nil,
          :schemaName => String.t() | nil,
          :skipIngestedDocuments => boolean() | nil
        }

  field(:inputPath)

  field(:pipelineConfig,
    as: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1IngestPipelineConfig
  )

  field(:processorType)
  field(:schemaName)
  field(:skipIngestedDocuments)
end

defimpl Poison.Decoder,
  for: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestPipeline do
  def decode(value, options) do
    GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestPipeline.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.ContentWarehouse.V1.Model.GoogleCloudContentwarehouseV1GcsIngestPipeline do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
